//
//  tableController.swift
//  foundationDemo
//
//  Created by Zhao Mingzhi on 16/6/23.
//  Copyright © 2016年 HNA. All rights reserved.
//

import UIKit

class tableController:UITableViewController,UIAlertViewDelegate{
    
    @IBOutlet weak var loginUserName: UITextField!
    @IBOutlet weak var loginPassword: UITextField!
    @IBAction func login(sender: AnyObject) {
        if(self.loginUserName.text=="123")&&(self.loginPassword.text=="123"){
//            var loginSuccess:UIAlertView = UIAlertView(title: "Success", message: "登陆成功", delegate: self, cancelButtonTitle: "cancel")
//            loginSuccess.show()
            let secondStroyBoard:UIStoryboard = UIStoryboard.init(name: "tableView", bundle: nil)
            let test2obj:UIViewController = secondStroyBoard.instantiateViewControllerWithIdentifier("table")
            self.navigationController?.pushViewController(test2obj, animated: true)
        }else{
            var loginError:UIAlertView = UIAlertView(title: "Error", message: "用户名或密码错误", delegate: self, cancelButtonTitle: "cancel")
            loginError.show()
        }
    }
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    
}